const child_process = require("child_process");
const { src, dest, series } = require("gulp");
const path = require("path");


function run(cb) {
    let objShell = child_process.exec("npx leb -s");
    objShell.stdout.on("data", data => {
        console.log(data)
    })

    objShell.stderr.on("data", data => {
        console.log(data);
    })

    objShell.on('exit', cb);
}

function compile() {
    return require("./compile")();
}

function publish() {
    let relDirName = "wxgame_r";

    return require("./publish")(relDirName);
}

function excel() {
    let exe = require("../tools/excel2json/excel2json")();
    return exe;
}

function run() {

    return require("./run")();
}

function ui(cb) {

    require("./build-ui")(cb);
}


exports.run1 = run;
exports.run = run;
exports.publish = exports.pus = publish;
exports.compile = compile;
exports.ui = ui;
exports.staticdata = exports.bd = excel;
exports.build = series(compile, publish);
